package com.weixin.tool;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class PropertiesTool {
	
	private static Properties properties = new Properties();
	
	public static void load(String filePath){
		try {
			properties.load(new FileInputStream(filePath));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String get(String key){
		return properties.getProperty(key);
	}
	
	public static void main(String[] args) {
		load("user.properties");
		System.out.println(get("user"));
	}
}
